package com.realgodo.site.entity.application.secret;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.realgodo.site.entity.IdEntity;
import com.realgodo.site.entity.space.Space;

@Entity(name="SecretJoiner")
@Table(name="secret_joiner")
public class SecretJoiner extends IdEntity {
	/** 评论参与者*/
	private static final long serialVersionUID = -681113663535935211L;
	
	private Secret secret;
	
	private Space space;
	/**参与者答案*/
	private String answer;
	
	@ManyToOne
	@JoinColumn(name = "secret_id", referencedColumnName = "id", nullable = false)
	public Secret getSecret() {
		return secret;
	}
	public void setSecret(Secret secret) {
		this.secret = secret;
	}
	
	@ManyToOne
	@JoinColumn(name = "space_id", referencedColumnName = "id", nullable = false)
	public Space getSpace() {
		return space;
	}
	public void setSpace(Space space) {
		this.space = space;
	}
	
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}
	
	
	

}
